pub mod gaode_map;

use serde::{Deserialize, Serialize};

#[derive(Deserialize, Debug, Clone)]
pub struct WebSocketMessage {
    pub op: Option<i32>,
    pub d: Option<D>,
    pub s: Option<i32>,
    pub t: Option<String>,
    pub id: Option<String>
}

#[derive(Deserialize, Debug, Clone)]
pub struct D {
    pub heartbeat_interval: Option<u64>,
    pub author: Option<Author>,
    pub content: Option<String>,
    pub group_id: Option<String>,
    pub group_openid: Option<String>,
    pub id: Option<String>,
    pub timestamp: Option<String>,
    pub version: Option<i32>,
    pub session_id: Option<String>,
    pub user: Option<User>
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Author {
    pub id: Option<String>,
    pub member_openid: Option<String>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct User {
    pub id: Option<String>,
    pub username: Option<String>,
    pub bot: Option<bool>
}